-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Dapr Crypto .NET Quickstart #1132
base: release-1.15
Are you sure you want to change the base?
Conversation
Signed-off-by: KentHsu <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
…uickstart-crypto-dotnet
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @WhitWaldo!! Same comments on this one:
- remove the python sdk commits,
- sign your commits
- Ensure similarity with the other crypto quickstarts
Same issue as the other - the python commit showed up when I targeted dapr:release-1.15 as it's not on my local branch. Again, should I be targeting a different branch to merge into? I didn't realize I missed a commit. I'll circle back on that one. This is the one project I actually read the other quickstarts and I didn't like them as much so I went in another direction. Why would anyone encrypt an image? It made more sense to me to offer practical examples that demonstrated several different techniques offered by the SDK:
I also considered adding a large-file version generated at runtime (so as not to add to the tree) that demonstrates the bidirectional streaming capability inherent to the SDK (not as easily done with HTTP) as it's been an ask several times for support greater than 4 GB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. please sync again to release-1.15
branch, and also make sure you're not carrying other remnants like the python work. I often do a git reset --hard origin/release-1.15
to force my local repo to sync with origin, and get rid of remnants.
I agree with your opinion here on a better use case for encryption. That said, I care about consistency and ease of use against the APIs first and foremost. So if we want to improve the quickstarts, I ask for a proposal and/or PR for all the languages, and not just diverge one. In the docs you can literally click/tab through the languages and see the same example in each language. |
@alicejgibbons is a better Googler of solutions than I! |
I'll grant you that it's nice to have the same output values in the docs, but if the goal is to use the test harness to validate that the program actually works, it's not meaningful. Simply confirming in the console that you started with an image and output an image doesn't actually validate that it was encrypted. My PR validates this and doesn't introduce a large artifact into the source tree. I'd be fine leaving this PR open until such time as the other Crypto PRs can be updated, but I don't have the bandwidth to do this today. |
@paulyuk I agree with @WhitWaldo in this case, because after doing an audit of the cryptography quickstarts we are not actually checking the result of the encryption and decryption call to the Dapr api for the file. See the python example below, we are checking that the encryption/decryption of a string works correctly ( See for example the test here: https://github.com/dapr/quickstarts/blob/master/cryptography/python/sdk/README.md?plain=1#L59-L67 Can we accept Whit's QS here as the "right way" and then make issues to update the other languages? You can assign me this work although I can't promise it'll be done for 1.15 😅 |
Description
Added quickstart demonstrating the use of the Dapr Crypto API showing encryption and decryption for both strings and file streams.
Issue reference
N/A - part of 1.15 endgame
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: